﻿using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Tauren.Business.Entity.Global;

namespace Tauren.Business.Entity.Input
{
    public class Unitinfo_Input
    {
        /// <summary>
        /// 单位ID
        /// </summary> 
        public virtual int UnitId { get; set; }

        /// <summary>
        /// 单位编码
        /// </summary>
        /// </summary
        [Display(Name = "单位编码"), Required(ErrorMessage = "{0}不能为空!"), StringLength(10, ErrorMessage = "{0}不超过10个字符"), RegularExpression(@"^([a-zA-Z0-9]){1,20}$", ErrorMessage = "请输入英文字符、数字组成的{0}")]
        public virtual string UnitCode { get; set; }

        /// <summary>
        /// 中文名称
        /// </summary>
        [Display(Name = "中文名称"), Required(ErrorMessage = "{0}不能为空!"), StringLength(100, ErrorMessage = "{0}不超过100个字符")]
        public virtual string CNName { get; set; }

        /// <summary>
        /// 英文名称
        /// </summary>
        [Display(Name = "英文名称"), Required(ErrorMessage = "{0}不能为空!"), StringLength(200, ErrorMessage = "{0}不超过200个字符")]
        public virtual string ENName { get; set; }

        /// <summary>
        /// 上级单位id
        /// </summary>
        public virtual int? ParentId { get; set; }
        /// <summary>
        /// 单位地址
        /// </summary>
        public virtual string UnitAddress { get; set; }
        /// <summary>
        /// 法人
        /// </summary>
        public virtual List<PersonInfo_InPut> Legals { get; set; } = new List<PersonInfo_InPut>();
        /// <summary>
        /// 移动电话
        /// </summary>
        public virtual string Phone { get; set; }
        /// <summary>
        /// 连线方式
        /// </summary>
        public virtual string Contact { get; set; }
        /// <summary>
        /// 禁用
        /// </summary>
        public virtual bool? Enable { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        public virtual double? Sequence { get; set; }
        public virtual int Level { get; set; }
    }
}
